using System;
using System.Collections.Generic;
using System.Data.Services;
using System.Linq;
using System.ServiceModel.Web;
using System.Web;
using System.ServiceModel;
using MimeCloud.AssetManagement.EntityFramework;

namespace MimeCloud.AssetManagement.DataProviders.ADONetService.Web
{
    [ServiceBehavior(IncludeExceptionDetailInFaults=true)]
    public class AssetManagerDataService : DataService<AssetManagerEntitiesConfigSourced>
    {
        // This method is called only once to initialize service-wide policies.
        public static void InitializeService(IDataServiceConfiguration config)
        {
            // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
            // Examples:
            // config.SetEntitySetAccessRule("MyEntityset", EntitySetRights.All);
            // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
            config.UseVerboseErrors = true;
            config.SetEntitySetAccessRule("*", EntitySetRights.All);
            config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
            
        }
    }
}
